Page({
  data: {
    userInfo:{},
    hasUserInfo:false
  },
  onLoad: function (options) {
    
  },
  getUserProfile(e){
    wx.getUserProfile({
      desc: '用于完善会员资料',
      success:(res)=>{
        this.setData({
          userInfo: res.userInfo,
          hasUserInfo: true
        })
      },
      fail:()=>{
        console.log('失败了')
      }
    })
  },
  toHome(){
    wx.switchTab({
      url: '/pages/home/home',
    })
  },
  onShareAppMessage: function () {

  }
})